<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Exam_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-exam_id" data-rule="required" min="0" data-source="exam/index" class="form-control selectpage" name="row[exam_id]" type="text" value="{$row.exam_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Code')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-code" class="form-control" name="row[code]" type="text" value="{$row.code|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', ['1'=>__('必考'), '2'=>__('选考'), '3'=>__('加考')], $row['type'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Extend_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-platform_course_id" placeholder="用于关联第三方编号" class="form-control" name="row[platform_course_id]" type="text" value="{$row.platform_course_id|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" min="0" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('服务时长')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-expire" data-rule="required" min="0" class="form-control" name="row[expire]" type="number" value="{$row.expire|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('服务单位')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[expire_type]', ['1'=>__('秒'), '2'=>__('分'), '3'=>__('时'), '4'=>__('天'), '5'=>__('月'), '6'=>__('年')], $row['expire_type'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('题库描述')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-desc"  class="form-control"  name="row[desc]" type="text" value="{$row.desc|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注信息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remark"  class="form-control"  name="row[remark]" type="text" value="{$row.remark|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">是否启用:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-status" name="row[status]" type="hidden" value="{$row.status|htmlentities}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-status" data-yes="1" data-no="2">
                <i class="fa fa-toggle-on text-success {eq name='row.status' value='2'}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
